package com.genius.dingding.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class FreshToken {
	
	//@Scheduled(cron = "0/5 * * * * ?")
	//@Scheduled(cron = "0 0 0/2 * * ? ")
	public void getToken() {
		GetDingDing2.getInstance().setNowTime();
		GetDingDing2.getInstance().setToken();
		GetDingDing2.getInstance().setJsapiTicket();
//		 SimpleDateFormat myFmt=new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒");  
//         Date now=new Date();  
//         System.out.println(myFmt.format(now));
	}
}
